SG Window IsgPaintSink
ClientPaint Method

©1998 by Stinga

IsgPaintSink      Constants     Error Codes
Description

Called when client area of the window should be painted.

Syntax

Private Sub IsgPaintSink_ClientPaint(ByVal hdc As Long, ByVal left As Long, ByVal top As Long, ByVal right As Long, ByVal bottom As Long)

Part Description
hdc Handle of the client area device context. Used as a parameter for all drawing functions.
left, top, right, bottom Coordinates of the smallest rectangle that completely encloses window's update region expressed in pixels relative to the window client area rectangle.
Remarks

When you implement IsgPaintSink interface this method must contain code responsible for client-area painting.

Example

Following example draws rectangle over window client area:

Private mWnd As SGWindow.Window

Private Sub IsgPaintSink_ClientPaint(ByVal hdc As Long, ByVal left As Long, _
            ByVal top As Long, ByVal right As Long, ByVal bottom As Long)

   ' Draw rectangle over whole client area
   Dim rc As RECT
   GetClientRect mWnd.HWND, rc
   Rectangle hdc, 0, 0, rc.right, rc.bottom
End Sub